-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Return NoResourceMatchError when appropriate for backwards compatibility. #2472
Conversation
Hi @porridge. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
/ok-to-test |
@alvaroaleman: once the present PR merges, I will cherry-pick it on top of release-0.16 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/hold |
subErrors := []error{} | ||
for gv, err := range *e { | ||
if apierrors.IsNotFound(err) { | ||
err = &meta.NoResourceMatchError{PartialResource: gv.WithResource("")} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This confuses me - In the initial issue description, @saschagrunert mentions that they expected to match through IsNotFound: #2354 (comment) - Which should this be?
@alvaroaleman good point, let's see. I created a tiny repro program to investigate the behaviour of an actual client that uses the mapper, and ran it on a few versions:
BTW, this also shows that the regression is only for the case of missing group(version) - error returned on a missing kind in an existing group+version is ok w.r.t. backwards compatibility. Unfortunately the missing group/version case is the most interesting one, as it's used to discover capabilities supported by the cluster. My theory on why @saschagrunert mentioned The conditional branches in the demo program I created mimics actual the code in my operator which is careful to distinguish between errors that satisfy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, porridge The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
@alvaroaleman: new pull request created: #2492 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes: #2354